<template>
  <div class="flowPartyMemberInfo">
  	<x-header :left-options="{backText: ''}">党员信息</x-header>		
  	<!--数据加载动画 start-->
		<div class="loadingBox" v-show="status == 0">
			<div class="loading">
				<div>loading..</div>
				<div></div>
				<div></div>
			</div>
		</div>
		<!--数据加载动画 end-->
  	
  	
  	<!--加载完成后 start-->
  	<div class="loadingOver" v-show="status == 1">
  	
	  	<!--基本信息 start-->
	  	<div class="baseInfo">
	  		<div class="baseInfo-title">基本信息</div>
	  		<div class="infoBox mt10">
	  			<label>姓名：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.Name"></div>
	  		</div>
	  		<div class="infoBox">
	  			<label>电话：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.mobphone"></div>
	  		</div>
	  		<div class="infoBox">
	  			<label>流出地：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.LCD"></div>
	  		</div>
	  		<div class="infoBox">
	  			<label>流出时间：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.LCSJ"></div>
	  		</div>
	  		<div class="infoBox">
	  			<label>工作单位：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.HomeAddress"></div>
	  		</div>
	  		<div class="infoBox">
	  			<label>所在支部：</label>
	  			<div class="info" v-text="flowPartyMemberInfo.DeptName"></div>
	  		</div>
	  	</div>
	  	<!--基本信息 end-->
	  	
	  	<!--党费收缴 start-->
	  	<div class="baseInfoBottom">
	  		<div class="baseInfoBottom-title">党费收缴</div>
	  		<div class="infoBox">
	  			<label>已缴月份：</label>
	  			<div class="info" v-text="flowPartyMemberPayInfo"></div>
	  		</div>
	  	</div>
	  	<!--党费收缴 end-->
	  	
	  	<!--思想汇报 start-->
	  	<div class="baseInfoBottom">
	  		<div class="baseInfoBottom-title">思想汇报</div>
	  		<div class="infoDec" v-html="flowPartyMemberInfo.SXHB"></div>
	  	</div>
	  	<!--思想汇报 end-->
	  </div>
		<!--加载完成 end-->
	  
	</div>
</template>

<script>
import init from '../assets/js/init';
import { XHeader, Actionsheet, TransferDom } from 'vux'
import Api from '../assets/js/api';

var api = new Api();

export default {
  name: 'flowPartyMemberInfo',
  data () {
    return {
    	status: 0,
    	flowPartyMemberInfo:{},//接收流动党员的详情信息
    	flowPartyMemberPayInfo:'',
    }
  },
  created(){
  	this.status = 0;
  	var self = this;
  	var result = localStorage.getItem("result");
  	var flowPartyMemberID = localStorage.getItem("flowPartyMemberID");
  	api.get(api.url.flowPartyMember,{ 
			params:{
				Action: 'DYGL_GETDYLDINFOBYAPP',
				p1: flowPartyMemberID,
				szhlcode: result
			}
		}).then(response=>{ 
			self.flowPartyMemberInfo = response.data.Result;
			self.flowPartyMemberPayInfo = response.data.Result1.Month;
			if(response.status == 200){
				this.status = 1;
			}
		}).catch(err=>{ 
			console.log(err);
		});
		
  },
  methods:{
		substr(val){
			return val.substr(0,10);
		}
  },
  components:{
  	XHeader,
    Actionsheet,
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
	@import url("../assets/css/common.css");
	.flowPartyMemberInfo{
		height: 100%;
	}
	.vux-header{
		background-color: #f00 !important;
		position: fixed !important;
		top: 0;
		left: 0;
		z-index: 2000;
		width: 100%;
	}
	
	.vux-header .vux-header-left .left-arrow:before{
		border: 2px solid #fff !important;
    border-width: 2px 0 0 2px !important;
	}
	.baseInfo{
		width: 100%;
		box-sizing: border-box;
		padding: 50px 0.5rem 0.25rem;
		background-color: #fff;
	}
	.baseInfo-title{
		width: 100%;
		line-height: 1.5rem;
		font-size: 0.65rem;
		color: #333;
		border-bottom: 1px solid #e9e9e9;
	}
	.baseInfo .infoBox{
		width: 100%;
		line-height: 1rem;
		font-size: 0.5rem;
		overflow: hidden;
	}
	.baseInfo .infoBox label{
		float: left;
		width: 22%;
		display: block;
	}
	.baseInfo .infoBox .info{
		float: left;
		width: 78%;
	}
	
	.baseInfoBottom{
		width: 100%;
		box-sizing: border-box;
		padding: 0.25rem 0.5rem 0.25rem;
		background-color: #fff;
		margin-top: 0.5rem;
	}
	.baseInfoBottom-title{
		width: 100%;
		line-height: 1.5rem;
		font-size: 0.65rem;
		color: #333;
		border-bottom: 1px solid #e9e9e9;
	}
	.baseInfoBottom .infoBox{
		width: 100%;
		line-height: 1.5rem;
		font-size: 0.5rem;
		overflow: hidden;
	}
	.baseInfoBottom .infoBox label{
		float: left;
		width: 22%;
		display: block;
	}
	.baseInfoBottom .infoBox .info{
		float: left;
		width: 78%;
	}
	.baseInfoBottom .infoBox .infoDec{
		font-size: 0.5rem;
		width: 100%;
	}
	.infoDec span{
		font-size: 0.5rem !important;
	}
	
	/*加载动画*/
	.loadingBox{
		width: 100%;
		height: 100%;
		display: flex;
		display: -webkit-flex;
		flex-direction: column;
		-webkit-flex-direction: column;
		align-items: center;
		-webkit-align-items: center;
		justify-content: center;
		-webkit-justify-content: center;
	}
	.loading {
	    border-radius: 50%;
	    font-size: 20px;
	    height: 100px;
	    line-height: 90px;
	    position: relative;
	    text-align: center;
	    width: 100px;
	}
	.loading > div:nth-child(2) {
	    border-color: #FFF;
	    left: 0px;
	    width: 90px;
	}
	.loading > div:nth-child(3) {
	    border-color: #009933;
	    left: -5px;
	    width: 100px;
	    -webkit-animation-delay: 0.5s;
	    -moz-animation-delay: 0.5s;
	    -ms-animation-delay: 0.5s;
	    -o-animation-delay: 0.5s;
	    animation-delay: 0.5s;
	}
	.loading > div:nth-child(2), .loading > div:nth-child(3) {
	    background-color: rgba(255, 255, 255, 0.2);
	    border: 5px solid #FFF;
	    border-radius: 50%;
	    box-shadow: 0 0 5px 0 #f00;
	    height: 100px;
	    position: absolute;
	    top: 0px;
	    border-top-width: 0;
	    border-bottom-width: 0;
	    -webkit-animation: anim3 2s linear infinite;
	    -moz-animation: anim3 2s linear infinite;
	    -ms-animation: anim3 2s linear infinite;
	    -o-animation: anim3 2s linear infinite;
	    animation: anim3 2s linear infinite;
	}
	@keyframes anim3{
		0% {
		    transform: rotateY(0deg);
		}
		50% {
		    transform: rotateY(180deg);
		}
		100% {
		    transform: rotateY(360deg);
		}
	}
</style>
